import { createStore,applyMiddleware,compose } from 'redux'
import rootReducer from '../reducers'
import thunk from 'redux-thunk'

let initialState = {
  home:{
    uid: null,
    username: null,
    avrtar: null,
    token: null,
    login:false,
    msg: null
  },
  disk:{
    quota: null,
    used: null,
    rootDir: null,
    Dirs: null,
    DirStack: Array(0),
    Node: null
  }
}

const configureStore = () => {
  return createStore(
    rootReducer,
    initialState,
    compose(
      applyMiddleware(thunk),
    )
  )
}

export default configureStore
